import Layout from '@/layout';

/**
 * PC端路由配置
 * <p>
 * 2025.01.11 geng.chen 拆分路由
 * <p>
 * 注释掉的代码, 我没有删
 * <p>
 * 没有版本管理, 没有文档记录, 唯有前端的路由历史, 见证了需求变更
 */
export const pcwebRoutes = [
  {
    path: '/txs',
    component: Layout,
    redirect: '/txs/salon',
    name: 'txs',
    meta: {
      title: '熠学实鉴',
      icon: 'el-icon-s-help',
      roles: ['0'],
    },
    children: [
      {
        path: 'bigb',
        name: 'Bigb',
        component: () => import('@/views/bigb/index'),
        meta: { title: '大B端', icon: 'el-icon-s-home' },
      },
      {
        path: 'salon',
        name: 'Salon',
        component: () => import('@/views/salon/index'),
        meta: { title: '医美门店', icon: 'el-icon-s-shop' },
      },
      {
        path: 'clerk',
        name: 'Clerk',
        component: () => import('@/views/clerk/index'),
        meta: { title: '门店顾客', icon: 'peoples' },
      },
      {
        path: 'report',
        name: 'Report',
        component: () => import('@/views/report/index'),
        meta: { title: '分析报告', icon: 'documentation' },
      },
    ],
  },
  // {
  //   path: '/shopdiag',
  //   component: Layout,
  //   redirect: '/shopdiag/diagnosis',
  //   name: 'shopdiag',
  //   meta: {
  //     title: '门店诊断',
  //     icon: 'el-icon-s-cooperation',
  //     roles: ['0', '11']
  //   },
  //   children: [
  //     {
  //       path: 'kanyu',
  //       name: 'Kanyu',
  //       component: () => import('@/views/shopdiag/kanyu'),
  //       meta: { title: '成交道场', icon: 'documentation', roles: ['0', '11'] }
  //     },
  //     {
  //       path: 'diagnosis',
  //       name: 'Diagnosis',
  //       component: () => import('@/views/shopdiag/diagnosis'),
  //       meta: { title: '诊断信息', icon: 'documentation', roles: ['0', '11'] }
  //     },
  //     {
  //       path: 'conclusion',
  //       name: 'Conclusion',
  //       component: () => import('@/views/shopdiag/conclusion'),
  //       meta: { title: '诊断报告', icon: 'documentation', roles: ['0', '11'] }
  //     }
  //   ]
  // },
  {
    path: '/baseinfo',
    component: Layout,
    redirect: '/baseinfo',
    name: 'baseinfo',
    meta: { title: '基础数据', icon: 'el-icon-s-tools', roles: ['0'] },
    children: [
      // {
      //   path: '0',
      //   name: 'Man',
      //   component: () => import('@/views/baseinfo'),
      //   meta: { title: '男性', icon: 'el-icon-s-custom' }
      // },
      // {
      //   path: '1',
      //   name: 'Woman',
      //   component: () => import('@/views/baseinfo'),
      //   meta: { title: '女性', icon: 'el-icon-user' }
      // },
      {
        path: 'alarm',
        component: () => import('@/views/baseinfo/alarm'),
        meta: { title: '门店报警', icon: 'el-icon-user' },
      },
    ],
  },
  {
    path: '/sys',
    component: Layout,
    redirect: '/sys/admin',
    name: 'sys',
    meta: { title: '系统管理', icon: 'el-icon-setting', roles: ['0'] },
    children: [
      {
        path: 'admin',
        name: 'Admin',
        component: () => import('@/views/sys/admin'),
        meta: { title: '系统管理', icon: 'el-icon-user-solid' },
      },
    ],
  },
  {
    path: '/organ',
    component: Layout,
    alwaysShow: true,
    redirect: '/organ/store',
    meta: { title: '集团', icon: 'el-icon-s-home', roles: ['14'] },
    children: [
      {
        path: 'store',
        component: () => import('@/views/organ/store'),
        meta: { title: '门店管理', icon: 'el-icon-s-shop' },
      },
      {
        path: 'account',
        component: () => import('@/views/organ/account'),
        meta: { title: '账号管理', icon: 'el-icon-user-solid' },
      },
      {
        path: 'consumer',
        component: () => import('@/views/organ/consumer'),
        meta: { title: '顾客管理', icon: 'el-icon-user' },
      },
      {
        path: 'user/:sid',
        component: () => import('@/views/organ/user'),
        hidden: true,
      },
      {
        path: 'client/:sid/:kid',
        component: () => import('@/views/organ/client'),
        hidden: true,
      },
    ],
  },
  {
    path: '/branch',
    component: Layout,
    alwaysShow: true,
    redirect: '/branch/clerk',
    meta: { title: '机构门店', icon: 'el-icon-s-platform', roles: ['15', '201', '202'] },
    children: [
      {
        path: 'account',
        component: () => import('@/views/branch/account'),
        meta: { title: '账号管理', icon: 'el-icon-user-solid' },
      },
      {
        path: 'consumer',
        component: () => import('@/views/branch/consumer'),
        meta: { title: '顾客管理', icon: 'el-icon-user' },
      },
      {
        path: 'clerk',
        component: () => import('@/views/branch/community'),
        meta: { title: '门店顾客', icon: 'el-icon-user', roles: ['201', '202'] },
      },
      {
        path: 'salon_private_domain',
        component: () => import('@/views/branch/SalonPrivateDomain'),
        meta: { title: '私域运营', icon: 'el-icon-document-copy' },
      },
    ],
  },
  {
    path: '/community',
    component: Layout,
    alwaysShow: true,
    redirect: '/middle/community/consumer',
    meta: { title: '中台社群', icon: 'el-icon-setting', roles: ['0', '11', '21'] },
    children: [
      {
        path: 'consumer',
        component: () => import('@/views/clerk/index'),
        meta: { title: '顾客管理', icon: 'el-icon-user-solid' },
      },
      {
        path: 'star',
        component: () => import('@/views/middle/community/star'),
        meta: { title: '管家管理', icon: 'el-icon-user-solid' },
      },
    ],
  },
  {
    path: '/operator',
    component: Layout,
    alwaysShow: true,
    redirect: '/middle/operator/salon_replay',
    name: 'operator',
    meta: { title: '中台运营', icon: 'el-icon-setting', roles: ['0', '13', '23'] },
    children: [
      {
        path: 'replay',
        component: () => import('@/views/middle/operator/salon_replay'),
        meta: { title: '机构管理', icon: 'el-icon-user-solid' },
      },
      {
        path: 'statistics',
        component: () => import('@/views/middle/operator/statistics'),
        meta: { title: '机构数据', icon: 'el-icon-document-copy' },
      },
      {
        path: 'director',
        component: () => import('@/views/middle/operator/director'),
        meta: { title: '院长管理', icon: 'el-icon-user-solid' },
      },
      {
        path: 'salon',
        component: () => import('@/views/salon/index'),
        meta: { title: '门店管理', icon: 'el-icon-s-shop', roles: ['0', '13'] },
      },
      {
        path: 'clerk',
        component: () => import('@/views/clerk/community'),
        meta: { title: '门店顾客', icon: 'peoples', roles: ['0', '13'] },
      },
    ],
  },
  {
    path: '/finance',
    component: Layout,
    redirect: '/middle/finance',
    meta: { title: '中台财务', icon: 'el-icon-s-finance', roles: ['0', '24'] },
    children: [
      {
        path: '',
        component: () => import('@/views/middle/finance/index'),
        meta: { title: '中台财务', icon: 'el-icon-s-finance' },
      },
    ],
  },
  {
    path: '/data',
    component: Layout,
    alwaysShow: true,
    redirect: '/middle/data/score',
    meta: { title: '中台数据', icon: 'el-icon-setting', roles: ['0', '22'] },
    children: [
      {
        path: 'score',
        component: () => import('@/views/middle/data/score'),
        meta: { title: '积分记录', icon: 'el-icon-user-solid' },
      },
      {
        path: 'screen',
        component: () => import('@/views/middle/data/screen'),
        meta: { title: '数据大屏', icon: 'el-icon-user-solid' },
      },
    ],
  },
];
